package cn.lg.soar.system.biz.modules.auth.mapper;

import cn.lg.soar.system.biz.modules.auth.entity.Permit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
public interface PermitMapper extends BaseMapper<Permit> {

    @Select("SELECT code FROM lg_sys_permit a INNER JOIN lg_sys_menu_2_permit b ON a.id=b.permit_id " +
            "WHERE menu_id IN(${menuIdsStr})")
    List<String> getPermitsByMenuIds(@Param("menuIdsStr") String menuIdsStr);

}
